#!/usr/bin/env ruby

input = open('.triggertest', 'r+')

fname = linenum = nil
loop do
  args = input.gets
  if args =~ /spec\//
    fname, linenum = args.split
  end

  if fname
    cmd = "bundle exec rspec #{fname} -l #{linenum}"
    puts cmd
    system cmd
  end
end
